package cn.jinzhu.zx.day1.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class User {
   @TableId(type = IdType.ID_WORKER) //mp自带策略，生成19位值，数字类型使用这种策略，比如long
    //@TableId(type = IdType.ID_WORKER_STR) //mp自带策略，生成19位值，字符串类型使用这种策略
    private Long id;
    private String username;
    private int gender;
    private String email;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @Version
    @TableField(fill = FieldFill.INSERT)
    private int version;

    private int deleted;
}
